<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/23 0023
 * Time: 下午 3:44
 */

namespace app\sports_admin\vaildate;


class Plan extends Base
{
    //添加验证
    public function insert()
    {
        $rule = [
            'motion'=>'require',
           // 'project_id'=>'require|integer',
            'plan_type_id'=>'require|integer',
            'class_id'=>'require|array'
        ];
        $msg = [
            'motion'=>'请填写教案名称',
           // 'project_id'=>'请选择运动类别',
            'plan_type_id'=>'请选择教案章节',
            'class_id'=>'请选择适合班级'
        ];
        self::goCheck($rule,$msg);
    }
    //修改验证
    public function update()
    {
        $rule = [
            'id'=>'require|integer',
            'motion'=>'require',
           // 'project_id'=>'require|integer',
            'plan_type_id'=>'require|integer',
            'class_id'=>'require|array'
        ];
        $msg = [
            'id'=>'请选择需要修改的教案',
            'motion'=>'请填写教案名称',
          //  'project_id'=>'请选择运动类别',
            'plan_type_id'=>'请选择教案章节',
            'class_id'=>'请选择适合班级'
        ];
        self::goCheck($rule,$msg);
    }
}